package cn.centec.bid.util;

import cn.centec.core.entity.Result;
import cn.centec.core.entity.StandardRequestParam;
import cn.centec.core.util.Centec6ApiUtil;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * 采购中心AIP工具 - 接收 - 招投标业务
 *
 * @author 延晓磊
 * @since 2022年11月04日
 */
@Component
public class Centec6BidReceiveApiUtil {

    @Resource
    private Centec6ApiUtil centec6ApiUtil;
    @Resource
    private Centec6BidReceiveHandler centec6BidReceiveHandler;

    /**
     * 接收请求
     *
     * @param param
     * @return
     *
     * @author 延晓磊
     * @since 2022年11月04日
     */
    @Transactional
    public Result receive(StandardRequestParam param){
        return centec6ApiUtil.receive(param, () -> centec6BidReceiveHandler.handle(param));
    }

}
